package com.lucas.lai.state.machine.squirrel.sample.one.service;

import com.lucas.lai.state.machine.squirrel.sample.one.model.OrderDTO;
import com.lucas.lai.state.machine.squirrel.sample.one.status.OrderState;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * @author lucas.lai
 * @date 2023/11/9
 */
@Slf4j
@Service
public class OrderServiceImpl implements OrderService {

   /* @Autowired
    OrderDTOMapper orderDTOMapper;*/

    @Override
    public int submitOrder(OrderState state) {
        OrderDTO orderDTO = new OrderDTO();
        orderDTO.setState(state);
        log.info("状态变更更新入库完成.....");
        //orderDTOMapper.insert(orderDTO);
        return 1;
    }

    @Override
    public void goPay(OrderState toState, OrderDTO orderDTO) {
        log.info("状态变更 去付款");
    }
}
